/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package visual;
//Muestran 3 tablas una que busque por fecha terminado, otra por fecha de entregado y otra por numero de libro

import java.awt.Color;
import Entidades.Libros;
/**
 *
 * @author Mathias Calache y Andres Latores
 */
public class FormConsultaPrestamos extends FormMenu {

    /**
     * Creates new form FormConsultaPrestamos
     */
    public FormConsultaPrestamos() {
        initComponents();
        this.getContentPane().setBackground( new Color(color));
        super.agenda.setVisible(false);
        super.etiqueta.setVisible(false);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        tabla5 = new javax.swing.JTable();
        fechaterm = new javax.swing.JLabel();
        txtTerminado = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        tabla6 = new javax.swing.JTable();
        fechaentre = new javax.swing.JLabel();
        txtEntrega = new javax.swing.JTextField();
        jScrollPane3 = new javax.swing.JScrollPane();
        tabla7 = new javax.swing.JTable();
        nombrelibro = new javax.swing.JLabel();
        txtLibro = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        Botoncete = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        tabla5.setBackground(new java.awt.Color(0, 0, 153));
        tabla5.setFont(new java.awt.Font("Modern No. 20", 1, 20)); // NOI18N
        tabla5.setForeground(new java.awt.Color(255, 255, 255));
        tabla5.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null}
            },
            new String [] {
                "Fecha Terminado"
            }
        ));
        jScrollPane1.setViewportView(tabla5);

        fechaterm.setFont(new java.awt.Font("Modern No. 20", 1, 18)); // NOI18N
        fechaterm.setForeground(new java.awt.Color(0, 0, 153));
        fechaterm.setText("Fecha Terminado:");

        txtTerminado.setFont(new java.awt.Font("Estrangelo Edessa", 0, 18)); // NOI18N
        txtTerminado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtTerminadoActionPerformed(evt);
            }
        });
        txtTerminado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtTerminadoKeyReleased(evt);
            }
        });

        tabla6.setBackground(new java.awt.Color(0, 0, 153));
        tabla6.setFont(new java.awt.Font("Modern No. 20", 1, 20)); // NOI18N
        tabla6.setForeground(new java.awt.Color(255, 255, 255));
        tabla6.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null}
            },
            new String [] {
                "Fecha Entrega"
            }
        ));
        jScrollPane2.setViewportView(tabla6);

        fechaentre.setFont(new java.awt.Font("Modern No. 20", 1, 18)); // NOI18N
        fechaentre.setForeground(new java.awt.Color(0, 0, 153));
        fechaentre.setText("Fecha Entrega:");

        txtEntrega.setFont(new java.awt.Font("Estrangelo Edessa", 0, 18)); // NOI18N
        txtEntrega.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEntregaActionPerformed(evt);
            }
        });
        txtEntrega.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtEntregaKeyReleased(evt);
            }
        });

        tabla7.setBackground(new java.awt.Color(0, 0, 153));
        tabla7.setFont(new java.awt.Font("Modern No. 20", 1, 20)); // NOI18N
        tabla7.setForeground(new java.awt.Color(255, 255, 255));
        tabla7.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null}
            },
            new String [] {
                "Numero de Libro"
            }
        ));
        jScrollPane3.setViewportView(tabla7);

        nombrelibro.setFont(new java.awt.Font("Modern No. 20", 1, 18)); // NOI18N
        nombrelibro.setForeground(new java.awt.Color(0, 0, 153));
        nombrelibro.setText("Numero de Libro:");

        txtLibro.setFont(new java.awt.Font("Estrangelo Edessa", 0, 18)); // NOI18N
        txtLibro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtLibroActionPerformed(evt);
            }
        });
        txtLibro.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txtLibroKeyReleased(evt);
            }
        });

        jLabel17.setBackground(new java.awt.Color(255, 0, 0));
        jLabel17.setFont(new java.awt.Font("Old English Text MT", 0, 48)); // NOI18N
        jLabel17.setForeground(new java.awt.Color(0, 0, 153));
        jLabel17.setText("Consulta Prestamos:");

        Botoncete.setFont(new java.awt.Font("Modern No. 20", 1, 18)); // NOI18N
        Botoncete.setForeground(new java.awt.Color(0, 0, 153));
        Botoncete.setText("Aceptar");
        Botoncete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotonceteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(29, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel17)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(fechaterm)
                                    .addGap(18, 18, 18)
                                    .addComponent(txtTerminado, javax.swing.GroupLayout.PREFERRED_SIZE, 226, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 391, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 391, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 391, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(fechaentre)
                                    .addGap(18, 18, 18)
                                    .addComponent(txtEntrega, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(nombrelibro)
                                    .addGap(18, 18, 18)
                                    .addComponent(txtLibro, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(28, 28, 28))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(Botoncete)
                        .addGap(42, 42, 42))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel17)
                .addGap(53, 53, 53)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fechaterm, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtTerminado, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fechaentre, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEntrega, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(16, 16, 16)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nombrelibro, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtLibro, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(Botoncete)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void txtTerminadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTerminadoActionPerformed
        
    }//GEN-LAST:event_txtTerminadoActionPerformed

    private void txtTerminadoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtTerminadoKeyReleased
  
    }//GEN-LAST:event_txtTerminadoKeyReleased

    private void txtEntregaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEntregaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtEntregaActionPerformed

    private void txtEntregaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtEntregaKeyReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_txtEntregaKeyReleased

    private void txtLibroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtLibroActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtLibroActionPerformed

    private void txtLibroKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtLibroKeyReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_txtLibroKeyReleased

    private void BotonceteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotonceteActionPerformed
        tabla5.setModel(listalibros(txtTerminado.toString()));
        tabla6.setModel(listalibros(txtEntrega.toString()));
        tabla7.setModel(listalibros(txtLibro.toString()));
    }//GEN-LAST:event_BotonceteActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FormConsultaPrestamos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FormConsultaPrestamos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FormConsultaPrestamos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FormConsultaPrestamos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FormConsultaPrestamos().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Botoncete;
    private javax.swing.JLabel fechaentre;
    private javax.swing.JLabel fechaterm;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JLabel nombrelibro;
    private javax.swing.JTable tabla5;
    private javax.swing.JTable tabla6;
    private javax.swing.JTable tabla7;
    private javax.swing.JTextField txtEntrega;
    private javax.swing.JTextField txtLibro;
    private javax.swing.JTextField txtTerminado;
    // End of variables declaration//GEN-END:variables
}
